﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class UIFlusher : MonoBehaviour
{
    private TopUIManager m_topUiManager;

    public PlayerEntityData playerEntityData;
    
    public void FlushAllUIElement()
    {

        if (m_topUiManager == null)
        {
            m_topUiManager = FindObjectOfType<TopUIManager>();
        }
        
        m_topUiManager.FlushLifeText(playerEntityData.HP, playerEntityData.maxHP);
        m_topUiManager.FlushMoneyText(playerEntityData.money);
        m_topUiManager.FlushDeckCardNumText(playerEntityData.currentDeck.Count);
        
    }
}
